package com.zcx.qshop.conn;

import org.json.JSONObject;

import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;

@HttpInlet(Conn.INTEL_JSON_GETCODE)
public class JsonGetcodeAsyGet extends QSAsyGet<String> {
	
	public String mobile, action;

	public JsonGetcodeAsyGet(String mobile, String action, AsyCallBack<String> asyCallBack) {

		super(asyCallBack);
		
		this.mobile = mobile;

		this.action = action;
		
 	}
	
	@Override
	public String parser(JSONObject object) { 
		
		if(object.optString("message").equals("1")){
			
			return object.optString("code");
			
		}else if(object.optString("message").equals("2")){

			TOAST = "用户不存在";

			return null;

		}
		
		return null;

	}
	
}
